import React from 'react'
import ReactDOM from 'react-dom'

import Newscontent from './view/index/index'
//import header from './view/header/header'

function createMarkup() { 
	return {
		__html: '<p> 今年夏天，安德烈-戈麦斯是巴萨签下的第四名球员</p><img src="http://oatest.rogrand.com:9527/sportsFellow/userfiles/1/images/business/sportsDaynews/2016/11/568696577862367914(1).jpg" />' 
	};
}
const __html = '<p> 今年夏天，安德烈-戈麦斯是巴萨签下的第四名球员</p><img src="http://oatest.rogrand.com:9527/sportsFellow/userfiles/1/images/business/sportsDaynews/2016/11/568696577862367914(1).jpg" />' 





//ReactDOM.render(<div dangerouslySetInnerHTML={createMarkup()} />,document.querySelector('#content'))
$.ajax({
	url:'../data.json',
	data : {},
	success : function(data){
		console.log(data);
		var data = data.data
		var title = data.title
		var author = data.author
		var createDate = data.createDate
		var content = data.content
		var withList = data.withList
		var newCommentList = data.newCommentList
		var splendidCommentList = data.splendidCommentList
		ReactDOM.render(<Newscontent title={title} author={author} creattime={createDate} newcontent={content} withList={withList} newCommentList = {newCommentList} splendidCommentList = {splendidCommentList}/>,document.querySelector('#content'))
		$('.news-paper').find('img').removeAttr('style')
	}
})